// function(browser) {} and browser => {} do the same
const customButton = "input#amount-custom"
const customText = "#choice-buttons > div > p"

describe("Elementary os", () => {

    beforeEach((client) => {
        client.url("https://elementary.io/")
    });
    // afterEach((client) => {
    //     client.end();
    // });


    it('Purchase elementary os', (client) => {
        client.useCss() // default "use css selector"
            .maximizeWindow()
            .click(customButton)
            .assert.textContains(customText, "Enter any dollar amount.",
                "\"Enter any dollar amount\" text is present")
    });

    it('Navigate to the support page', (client) => {
        client.click('a[href="/support"]')
            .assert.titleEquals("Support ⋅ elementary")
            .assert.urlContains('support');

    });
});